package com.gxar.navigation.server.base.model.line.vo;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.gxar.navigation.server.base.model.node.vo.LocationVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * @author linsy
 * @version 1.0
 * @created 2023/9/12 14:25
 */
@Data
public class LineCreateVO {

    @ApiModelProperty("路段名称")
    @JSONField(name = "name")
    @JsonProperty("name")
    private String name;

    @ApiModelProperty("起点nodeId")
    @JSONField(name = "origin")
    @JsonProperty("origin")
    @NotNull(message = "起点不能为空")
    private LocationVO origin;

    @ApiModelProperty("终点nodeId")
    @JSONField(name = "destination")
    @JsonProperty("destination")
    @NotNull(message = "终点不能为空")
    private LocationVO destination;

    @ApiModelProperty("路线距离（单位：米）")
    @JSONField(name = "distance")
    @JsonProperty("distance")
    private Double distance;

    @ApiModelProperty("线路方向（East/South/West/North）")
    @JSONField(name = "orientation")
    @JsonProperty("orientation")
    @NotBlank(message = "方向不能为空")
    private String orientation;

    @ApiModelProperty("角度（0～360）")
    @JSONField(name = "angle")
    @JsonProperty("angle")
    @Min(message = "最小值为0", value = 0)
    @Max(message = "最大值为360", value = 360)
    private Integer angle;

    @ApiModelProperty("路段指示信息")
    @JSONField(name = "instruction")
    @JsonProperty("instruction")
    private String instruction;

    @ApiModelProperty("半径（单位：米）")
    @JSONField(name = "radius")
    @JsonProperty("radius")
    private Integer radius;

}
